package net.jsoft.platform.security.repository;

import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import net.jsoft.platform.security.entity.parms.SecurityParms;

@CacheConfig(cacheNames = "securityParms")
public interface SecurityParmsRepository extends JpaRepository<SecurityParms, Long>
{

    @Cacheable
    @Query("from SecurityParms u where u.name=:name")
    SecurityParms selectParms(@Param(value = "name") String name);
}
